package com.cerosoft.api.http.models;

/**
 * Encapsulates a request result, with result code and body
 * @author nliang@book.com
 *
 * @param <T>
 */
public class HttpResult<T> {
	private int code;
	private T value;
	
	/**
	 * Full constructor
	 * @param code
	 * @param value
	 */
	public HttpResult(int code, T value) {
		this.code = code;
		this.value = value;
	}
	
	/**
	 * Get the http result code
	 * @return
	 */
	public int getCode() { return this.code; }
	
	/**
	 * Get the body
	 * @return
	 */
	public T getValue() { return this.value; }
}
